{% extends 'article/base.html' %}
{% load article_tags %}
{% block title %} articles
{% endblock %}

{% block link %}
{% endblock %}

{% block content %}
    <div class="row text-center">
        <h1>阅读，丰富头脑，善化行为</h1>
        <p>这里已经有{% total_articles %}篇文章供你阅读</p>
    </div>
    <div class="container">
        {% for article in articles %}
            <div class="list-group">
                <a href="{{ article.get_url_path }}" class="list-group-item active">
                    <h4 class="list-group-item-heading">{{ article.title }}</h4>
                    <p class="list-group-item-text">作者：<a href="{% url 'article:author_article' article.author.username %}" >{{ article.author.username }}</a></p>
                    <p class="list-group-item-text">概要：{{ article.body|slice:'70'|linebreaks }}</p>
                </a>
            </div>
        {% endfor %}
        {% include 'paginator.html' %}
    </div>
{% endblock %}

{% block javascript %}
{% endblock %}